<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"  
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">
<head>
<meta charset="UTF-8"></meta>
<title>用户注册</title>
</head>
<body>
<!--注意这里的th:object="${user}"-->
    <form th:object="${userForm}"  action="#" th:action="@{/register}" method="post">
        <label for="nickname">Nick Name: </label>
        <input type="text" th:field="*{nickname}"/>
        <br/>
        <label for="username">User Name: </label>
        <input type="text" th:field="*{username}"/>
        <br/>
        <label for="avatar">Description: </label>
        <!--注意这里的th:field="*{userDescription}"-->
        <input type="text" th:field="*{avatar}"/>
        <br/>
        <label for="password">Password: </label>
        <input type="password" th:field="*{password}"/>
        <br/>
        <input type="reset"/>
        <input type="submit"/>
    </form>

</body>
</html>